package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.HashMap;

@Mapper
public interface UserMapper {


    @Select("select * from user where openid =#{openId}")
    User getUserByOpenId(String openId);


    void insertUser(User user);

    @Select("select * from user where id =#{userId}")
    User getById(Long userId);

    Integer countByMap(HashMap<Object, Object> map);
}
